class Result {
  constructor(code, msg, data) {
    this.code = code;
    this.msg = msg;
    this.data = data;
  }
  static OK(data) {
    return new Result(200, "操作成功", data);
  }
  static ERROR(code, msg) {
    return new Result(code, msg, null);
  }
}

module.exports = Result;
